package fr.umlv.m2.uwp2011.web.client.secretary;

import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.ListBox;
import com.google.gwt.user.client.ui.VerticalPanel;

import fr.umlv.m2.uwp2011.web.client.Session;


public class SecretaryCursusEditor extends Composite {

	public SecretaryCursusEditor(Session session) {
		VerticalPanel mainPanel = new VerticalPanel();
		mainPanel.addStyleName("mainPanel");

		ListBox selectSubject = new ListBox(false);
		selectSubject.setVisibleItemCount(1);

		selectSubject.addItem("M2-Image");
		selectSubject.addItem("M2-Logiciel");

		selectSubject.addStyleName("selectSubject");

		mainPanel.add(selectSubject);

		HorizontalPanel subPanel = new HorizontalPanel();
		
		VerticalPanel truncManagement = new VerticalPanel();
		
		Label tronc = new Label("Tronc");
		tronc.addStyleName("label");
		truncManagement.add(tronc);
		
		ListBox truncList = new ListBox();
		truncList.addItem("Modélisation 3D");
		truncList.addItem("Traitement du signal");
		truncList.addItem("Anglais");
		truncList.addItem("C++");
		truncList.setVisibleItemCount(truncList.getItemCount());
		truncList.addStyleName("item");
		
		truncManagement.add(truncList);
		truncManagement.addStyleName("column");
		
		subPanel.add(truncManagement);

		
		VerticalPanel listButton = new VerticalPanel();

		Button removeButton = new Button(">");
		listButton.add(removeButton);
		Button addButton = new Button("<");
		listButton.add(addButton);
		Button removeAllButton = new Button(">>");
		listButton.add(removeAllButton);
		Button addAllButton = new Button("<<");
		listButton.add(addAllButton);

		listButton.addStyleName("listButton");
		subPanel.add(listButton);

		VerticalPanel subjectManagement = new VerticalPanel();
		
		Label matiere = new Label("Matière");
		matiere.addStyleName("label");
		subjectManagement.add(matiere);
		
		ListBox subjectList = new ListBox();
		subjectList.addItem("Conduite De Projet");
		subjectList.addItem("JEE");
		subjectList.addItem("UML");
		subjectList.addItem("Interface Graphique");
		subjectList.setVisibleItemCount(subjectList.getItemCount());
		subjectList.addStyleName("item");
		
		subjectManagement.add(subjectList);
		subjectManagement.addStyleName("column");
		
		subPanel.add(subjectManagement);
		subPanel.addStyleName("subPanel");
		mainPanel.add(subPanel);

		this.initWidget(mainPanel);
	}

}
